package uicgas.station.remotecmds;

import uicgas.communication.RemoteCommand;
import uicgas.globaldata.ClientTypes;
import uicgas.globaldata.MessagePayload;
import uicgas.station.StationLogic;

public class ValidateCard implements RemoteCommand
{
	private StationLogic thisStation;
	private int sourceID;
	private ClientTypes sourceType;

	public ValidateCard(StationLogic thisStation, int sourceID,
			ClientTypes sourceType)
	{
		this.thisStation = thisStation;
		this.sourceID = sourceID;
		this.sourceType = sourceType;
	}

	@Override
	public void executeRemoteCommand()
	{

	}

	@Override
	public int executeRemoteCommand(MessagePayload data)
	{
		if (data != null)
		{
			thisStation.validateCard(data, sourceID, sourceType);
			return 0;
		}
		else
			return -1;
	}

	//	@Override
	//	public int executeRemoteCommand(MessagePayload data, int sourceID,
	//			ClientTypes sourceType)
	//	{
	//		// TODO Auto-generated method stub
	//		if (data != null)
	//		{
	//			thisStation.validateCard(data, sourceID, sourceType);
	//			return 0;
	//		}
	//		else
	//			return -1;
	//	}

}
